The present invention relates to database systems of the type having at least two host processing apparatuses with respective host databases and a remote processing apparatus with a remote database, where the contents of the remote database are synchronized with the host databases, so that changes made to any of the databases are propagated to the other databases.
With the terminology above, a host processing apparatus may for instance be a desktop personal computer having a calendar or an address book as its host database. Correspondingly, a remote processing apparatus may be a hand-held communicator, such as a portable digital assistant (PDA) or a mobile telephone, having a corresponding calendar or address book as its remote database. The host and remote databases are intended to contain the same information, i.e. the same calendar or address book entries, and provide great flexibility to a user: when working at his office, the user will use the calendar in his desktop computer for keeping track of meetings, deadlines, birthdays, etc. When the user goes mobile, for instance for visiting customers, business partners, etc, the user will bring his portable digital assistant or mobile telephone and continue to use the calendar in the remote database therein. Changes made to either the host database in the desktop computer or the remote database in the portable digital assistant will have to be propagated to the other database in order to maintain consistency between the databases. The process of forcing two databases to contain the same information is often referred to as synchronization.
U.S. Pat. No. 5,729,735 discloses a computer database system having a master database in a master computer and multiple remote databases in portable computers. The remote databases are initially created by copying data from the master database. For each remote database thus created, the system also creates a backup file, which is stored in the master computer and reflects contents of each remote database, when this was created or last synchronized. For time to time, the system synchronizes data in the master database with one of the remote databases. To this end, the system compares corresponding data in the master database, the remote database and the backup file to determine which database (remote or master) that has a more current version of the data. The system then updates the database that has the less current data with data from the database that has the more current data. After having synchronized the databases, the system copies all data from the remote database to the backup file.
Thus, the database system of U.S. Pat. No. 5,729,735 is capable of synchronizing a master database and a remote database. However, since the synchronization is performed by comparing the whole contents of the master database and the remote database to the whole contents of the backup file (which in itself is a complete copy of the remote database), the procedure is time-consuming and requires a large amount of resources.
U.S. Pat. No. 5,790,974 disclose a personal calendaring system including a portable calendaring system and a complementary office calendar system. Calendar entries are synchronized by two-way wireless transmission, such as infrared link or a radio paging interface. Changes made to one of the calendars are immediately propagated through the wireless interface to the other calendar. The system has an advantage in that synchronization is performed immediately but has a drawback in that it requires operational connection between the two calendars (i.e., that the portable calendaring system is within reach of the infrared link or radio paging interface).
While it may be a straightforward task to synchronize a single host database and a single remote database, the job gets more difficult, when more than two databases are involved. Particularly care has to be exercised in order to avoid that changes made to one of the databases propagate incorrectly to the other databases. One such situation is when the remote database has limited storage capacity (for instance due to limited memory size in a portable digital assistant, etc). For such a limited-size remote database, old database items stored therein may sometimes have to be sacrificed (i.e. deleted) in order to make room for new items. Such deletions, which are made only in order to release storage space in the remote database, must not propagate to the other databases.
It is an object of the present invention to provide a database system involving at least two host databases and a remote database, which system is capable of performing synchronization more efficiently than the prior art solutions.
It is a particular purpose of the invention to prevent deletions, that are only made in order to release storage space in the remote database, from propagating to the host databases.
The above objects are achieved for a database system having at least two host databases and a remote database, where the host databases and the remote database are synchronized by means of a synchronization engine for each host database, by the provision of a first log file having entries representing changes made to the remote database, including additions and modifications of items in the remote database as well as deletions of items from the remote database in order to increase its free storage space available for storing new items, and by the provision of a second log file having entries representing deletions from the remote database upon respective deletions in either of the host databases, wherein the synchronization engine is adapted to perform deletions of items in its host database in accordance with the entries in the second log file but not in the first log file.
Other objects, advantages and features of the present invention will appear from the following detailed disclosure of a preferred embodiment, from the attached drawings as well as from the appended claims.